/*
    This file is part of the substandard lisp implementation of Standard Lisp
    Copyright (C) 2011 Nicky Nickell

    substandard lisp is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
    functions not defined in slr but needed/included anyway
*/

function std_lambda(a, env) {
  var args = a[0];
  var expr = a[1];

  return new interpreted_function(expr, args, FTYPE_EXPR);
}
builtins['lambda'] = new builtin_function(std_lambda, 2, false, [TYPE_PAIR, CLASS_ANY], FTYPE_FEXPR);

function std_time(a, env) {
  return new lisp_integer(Math.round(new Date().getTime()/1000));
}
builtins['time'] = new builtin_function(std_time, 0, false, [], FTYPE_EXPR);

function std_date(a, env) {
  return new lisp_string(new Date());
}
builtins['date'] = new builtin_function(std_date, 0, false, [], FTYPE_EXPR);
